{extend name="base/index"/}
{block name="page_location"}
<div class="row">
	<div class="col-12">
		<div class="page-title-box">
			<div class="page-title-right">
				<ol class="breadcrumb m-0">
					<li class="breadcrumb-item"><a href="{:url('index/index')}">管理中心</a></li>
					<li class="breadcrumb-item active"><i class="iconfont icon-angle-right"></i>支付流水管理</li>
				</ol>
			</div>
			<h4 class="page-title">支付流水列表</h4>
		</div>
	</div>
</div>
{/block}
{block name="body"}
<link rel="stylesheet" href="__PLUGIN__/jQuery.cxCalendar/css/jquery.cxcalendar.css" />	
<div class="row" id="payrecord_list_page">
	<div class="col-12">
		<div class="card">
			<div class="card-body">
				<form action="{:url('pay/index')}" method="get"  id="payrecord_search_frm">
					<div class="form-row align-items-center">
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">选择</div>
								</div>
								<select class="form-control" tabindex="1" name="type">
									<option value="">所有</option>
									<option value="1" {eq name="type" value="1"}selected="selected"{/eq}>支付宝</option>
									<option value="2" {eq name="type" value="2"}selected="selected"{/eq}>微信支付</option>
									<option value="3" {eq name="type" value="3"}selected="selected"{/eq}>网银支付</option>
								</select>
								<select class="form-control" tabindex="1" name="status">
									<option value="">所有</option>
									<option value="1" {eq name="status" value="1"}selected="selected"{/eq}>支付成功</option>
									<option value="0" {eq name="status" value="0"}selected="selected"{/eq}>支付失败</option>
								</select>
							</div>								
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">开始</div>
								</div>
								<input type="text" class="form-control" name="stime" placeholder="选择开始时间" value="{$stime}">
							</div>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">结束</div>
								</div>
								<input type="text" class="form-control" name="etime" placeholder="选择开始时间" value="{$etime}">
							</div>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">搜索</div>
								</div>
								<input type="text" class="form-control kw enter_goto" name="kw" placeholder="搜索会员名、订单号" value="{$kw}">
							</div>
						</div>
						<div class="col-auto">
							<button type="submit" class="btn btn-primary mb-2">搜索</button>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-addon">
									<a href="javascript:;" class="btn btn-primary check_select_btn" id="export_xls_btn">结果导出</a>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>				
				<table class="table table-hover">
                    <thead>
                        <tr>
                            <th width="5%">ID</th>
                            <th width="10%">支付类型</th>
                            <th width="10%">支付流水号</th>
                            <th width="10%">订单号</th>
                            <th width="10%">会员名</th>
                            <th width="10%">信息</th>
                            <th width="10%">支付金额</th>
                            <th width="10%">支付时间</th>
                            <th width="10%">支付状态</th>
                            <th width="10%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
						{volist name="list" id="data"}
                        <tr>
                            <td>{$data.id}</td>
                            <td>
                            	{switch name="data.type"}
                            		{case value="1"}<span class="badge badge-primary">支付宝支付</span>{/case}
                            		{case value="2"}<span class="badge badge-secondary">微信支付</span>{/case}
                            		{case value="3"}<span class="badge badge-success">网银支付</span>{/case}
                            	{/switch}
                            </td>
                            <td title="{$data.payoid}">{$data.payoid|ReStrLen=5}</td>
                            <td>{$data.oid}</td>
                            <td>{$data.uname|ReStrLen=10}</td>
                            <td>{$data.msg}</td>
                            <td>{$data.amount} 元</td>
                            <td title="{$data.posttime|date="Y-m-d H:i:s",###}"><span class="badge badge-primary">{$data.posttime|date="Y-m-d H:i",###}</span></td>
                            <td>
                            	{eq name="data.status" value="1"}
                            		<span class="badge badge-primary">支付成功</span>
                            	{else /}
                            		<span class="badge badge-danger">支付未完成</span>
                            	{/eq}
                            </td>
                            <td>
                            	<a href="javascript:;" class="btn btn-primary btn-sm Fast_Del" attr-id="{$data.id}" attr-msg="您确认删除此支付记录?" attr-model="Pay">删除</a>
                            </td>
                        </tr>
						{/volist}
                    </tbody>
                </table>
                <div class="row">
                	<div class="col-12" style="text-align: center;">
                		{$pagelist}
                	</div>
                </div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__PLUGIN__/jQuery.cxCalendar/js/jquery.cxcalendar.min.js"></script>
<script type="text/javascript" src="__PLUGIN__/jQuery.cxCalendar/js/jquery.cxcalendar.languages.js"></script>
<script type="text/javascript">
$(function(){
	$("input[name=stime]").cxCalendar({type: 'datetime',format: 'YYYY-MM-DD HH:mm:ss'});
	$("input[name=etime]").cxCalendar({type: 'datetime',format: 'YYYY-MM-DD HH:mm:ss'});
});
</script>
{/block}